import { memo } from 'react';
import BizHeader from '@inbiz/basic/BizHeader';
import BizBody from '@inbiz/basic/BizBody';

const Text = memo((props: any) => {
  const { text, fontSize, color, textIndent, lineHeight, textAlign } = props;

  return (
    <>
      <BizHeader {...props} />
      <BizBody {...props}>
        <div
          style={{
            color,
            textIndent,
            fontSize,
            lineHeight,
            textAlign,
            zIndex: 1,
            border: 'none',
            resize: 'none',
            width: '100%',
            height: 'calc(100% - 10px)',
            flexDirection: 'column',
            overflow: 'auto',
            backgroundColor: 'inherit',
            wordBreak: 'break-word',
          }}
        >
          {text}
        </div>
      </BizBody>
    </>
  );
});
export default Text;
